Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@babel/plugin-syntax-numeric-separator
Advanced tools
Allow parsing of Decimal, Binary, Hex and Octal literals that contain a Numeric Literal Separator
The @babel/plugin-syntax-numeric-separator package allows Babel to parse JavaScript code that uses the numeric separator feature. This feature enables developers to make their numeric literals more readable by creating a visual separation between groups of digits, similar to how commas or spaces are used in human-readable numbers.
Parsing Numeric Literals with Underscore Separators
This feature allows developers to include underscores in numeric literals as separators to enhance readability without affecting the underlying value.
1000000 // without numeric separator
1_000_000 // with numeric separator
This package not only allows Babel to parse numeric literals with separators but also transforms them into standard JavaScript numbers that can be executed in environments that do not support the numeric separator syntax. It is a step beyond just the syntax plugin, providing both parsing and transformation capabilities.
TypeScript, a superset of JavaScript, includes support for numeric separators. It can parse and emit JavaScript code with or without numeric separators, providing similar functionality to Babel's numeric separator plugins but within the TypeScript language and compiler.
Allow parsing of Decimal, Binary, Hex and Octal literals that contain a Numeric Literal Separator
See our website @babel/plugin-syntax-numeric-separator for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-numeric-separator
or using yarn:
yarn add @babel/plugin-syntax-numeric-separator --dev
FAQs
Allow parsing of Decimal, Binary, Hex and Octal literals that contain a Numeric Literal Separator
The npm package @babel/plugin-syntax-numeric-separator receives a total of 20,868,570 weekly downloads. As such, @babel/plugin-syntax-numeric-separator popularity was classified as popular.
We found that @babel/plugin-syntax-numeric-separator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.